<template>
  <div class="map" ref="mapRef">
    
  </div>
</template>

<script setup lang="ts">
import {ref,onMounted}  from 'vue'

const mapRef = ref()

onMounted(()=>{
var map = new window.BMapGL.Map(mapRef.value); // 创建Map实例
map.centerAndZoom("成都市",12); // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放

})

</script>

<style lang="less" scoped>
.map{
    width:100%;
    height: 100vh;
}

</style>
